<template>
  <BTable :columns="columns" :tableData="tableData" :actions="actions" />
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import BTable from '@/components/BTable.vue';

let tableData = ref([
  {
    date: '2016-05-02',
    name: '王小虎',
    address: '上海市普陀区金沙江路 1518 弄'
  },
  {
    date: '2016-05-04',
    name: '张小刚',
    address: '上海市普陀区金沙江路 1517 弄'
  },
  {
    date: '2016-05-01',
    name: '李小红',
    address: '上海市普陀区金沙江路 1519 弄'
  },
  {
    date: '2016-05-03',
    name: '周小伟',
    address: '上海市普陀区金沙江路 1516 弄'
  }
])

let columns = ref([
  {
    prop: 'date',
    label: '日期',
    sortable: 'custom',
    width: '180'
  },
  {
    prop: 'name',
    label: '姓名',
    sortable: 'custom',
    width: '180'
  },
  {
    prop: 'address',
    label: '地址'
  }
])

const actions = ref([
  {
    label: '编辑',
    size: 'small',
    type: 'primary'
  },
  {
    label: '删除',
    size: 'small',
    type: 'danger'
  }
]);

</script>

<style scoped lang='scss'></style>
